The Essence of the Visitor
نویسندگان
چکیده
For object-oriented programming, the Visitor pattern enables the deenition of a new operation on an object structure without changing the classes of the objects. The price has been that the set of classes must be xed in advance, and they must each have a so-called accept method. In this paper we demonstrate how to program visitors without relying on accept methods and without knowing all classes of the objects in advance. The idea, derived from related work on shape polymorphism in functional programming, is to separate (1) accessing subobjects, and (2) acting on them. In the object-oriented setting, re-ection techniques support access to sub-objects, as demonstrated in our Java class, Walkabout. It supports all visitors as subclasses, and they can be programmed without any further use of reeection. Thus a program using the Visitor pattern can now be understood as a specialized version of a program using the Walkabout class.
منابع مشابه
The Essence of the Visitor Pattern
For object-oriented programming, the Visitor pattern enables the definition of a new operation on an object structure without changing the classes of the objects. The price has been that the set of classes must be fixed in advance, and they must each have a so-called accept method. In this paper we demonstrate how to program visitors without relying on accept methods and without knowing all cla...
متن کاملبررسی ساحت ذات احدیت از منظر عرفان نظری.
The stage of the Unity essence is the first stage of manifestation and determination of the essence of the “Unseen of the Unseens” in which the names and entities have conceptual and denotation unity with each other and with the Essence. Perception of the unity essence in mystics language is usually uttered as the stage of manifestation of presence of ipseity and the Unseen of the Unseens and t...
متن کاملThe Mystic View on the Possibility of Discussing the Divine Essence and the Criticism of its Opposing Theory (of ‘Allāmah Ṭabātabā’ī)
The main subject of this study is to examine the possibility of discussing the divine essence in Ibn ‘Arabī‘s school of mysticism. The author of this article intends to investigate the possibility of the relative discussion of the divine essence. However, opposing theories such as ‘Allāmah Ṭabātabā’ī’s stance in Al-Rasā’il al-tawḥīdiyya favor the absolute impossibility of talking about the divi...
متن کاملEvaluation of the Phenotypic and Genotypic Effects of Satureja Khuzestanica Essence and Copper Nanocomplex on the Expression of Alkaline Protease Gene in Pseudomonas Aeruginosa by RT-PCR Method
Background & aim: Pseudomonas aeruginosa is a gram-negative bacillus and an opportunistic pathogen that causes high mortality in immunocompromised patients. The main antimicrobial activity of Satureja khuzestanica essence is due to carvacrol phenolic components. Nanomaterials can be a good choice because of low toxicity to fight pathogenic microbes. The aim of this study was to evaluate the e...
متن کاملa being of the simplest essence’ ‘ The principle of
The principle of ‘a being of the simplest essence’, basitulhaqiqah, is one of the most important one in transcendent philosophy upon which has been based the solution of many complicated and difficult problems. Now a question appears as: can the principle form a proof for the simplicity of the Necessary? In the paper, the principle has been analyzed and its background presented. Then it has ...
متن کامل